//
// Created by zing on 3/28/2020.
//

#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main() {
    char *filename = "test.txt";
    int fd;
    fd = open(filename, O_RDWR);
    if (fd < 0) {
        perror("open file error");
        return EXIT_FAILURE;
    }
    close(fd);
    return EXIT_SUCCESS;
}